<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%   
String path = request.getContextPath();   
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";   
%> 
<h2 class="tl"><a href="u/index.html">${user.name}</a></h2>
<div class="img">
	<c:if test="${user.headImg==null or user.headImg=='' }">
		<img class="img-polaroid" src="upload/head/default.jpg" height=160 width=160 />
	</c:if>
	<c:if test="${user.headImg!=null and user.headImg!='' }">
		<img class="img-polaroid" src="upload/head/${user.headImg }" height=160 width=160 />
	</c:if>
</div>
<div class="profile">
	<p><b>${user.name}</b>&nbsp;&nbsp;${user.profession }<c:if test="${user.profession==null or user.profession=='' }">游民</c:if></p>
	<p>
		<span class="saved" id="profile-saved"><b>个人简介:&nbsp;</b><font>${sessionScope.user.profile}<c:if test="${sessionScope.user.profile==null or sessionScope.user.profile==''}">留点什么吧！</c:if></font>&nbsp;&nbsp;<i class="icon-pencil" onclick="editorProfile()"></i></span>
		<span class="editor" id="profile-editor" style="display:none;width:160px;overflow:hidden">
			<textarea id="profile-input" style="width:160px;max-width:160px;height:80px" >${sessionScope.user.profile}</textarea>&nbsp;&nbsp;<i class="icon-ok" onclick="saveProfile(this)"></i>
		</span>
	</p>
</div>
<div class="tongji">
	<div>
		<p class="t">${user.followNum }</p>
		<p class="b">关注</p>
	</div>
	<div>
		<p class="t">${user.fansNum }</p>
		<p class="b">被关注</p>
	</div>
	<div>
		<p class="t">${user.articleNum+user.answersNum }</p>
		<p class="b">记录</p>
	</div>
</div>
<ol class="unstyled">
	<li>
		<a href="u/answerd.html"><i class="icon-edit"></i>&nbsp;已答题问</a>
	</li>
	<li>
		<a href="u/question.html"><i class="icon-comment"></i>&nbsp;新问题</a>
	</li>
	<li>
		<a href="u/ignore.html"><i class="icon-edit"></i>&nbsp;忽略的问题</a>
	</li>
	<li>
		<a href="u/self.html"><i class="icon-file"></i>&nbsp;我的短文</a>
	</li>
	<li>
		<a href="u/squestion.html"><i class="icon-share-alt"></i>&nbsp;我发出的问题</a>
	</li>
	<li>
		<a href="u/collect.html"><i class="icon-folder-open"></i>&nbsp;我收藏的<span>答案</span></a>
	</li>
</ol>
<hr/>
<ol class="unstyled">
	<li>
		<a href="u/follow.html"><i class="icon-edit"></i>&nbsp;我关注的</a>
	</li>
	<li>
		<a href="u/fans.html"><i class="icon-comment"></i>&nbsp;关注我的</a>
	</li>
	<li>
		<a href="u/active.html"><i class="icon-edit"></i>&nbsp;感兴趣的</a>
	</li>
</ol>